﻿@model AdvCMS.Data.IAdvPage
           


@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/Admin.cshtml";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script type="text/javascript" src="@Url.Content("~/scripts/tiny_mce/tiny_mce.js")"></script>

<script type="text/javascript">
    tinyMCE.init({
        mode: "textareas",
        width: "640" 
    });
</script>
<h2>Edit</h2>
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Page</legend>

        @Html.HiddenFor(model => model.Id)
         <div class="editor-label">
            @Html.LabelFor(model => model.PageName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PageName)
            @Html.ValidationMessageFor(model => model.PageName)
        </div>
         <div class="editor-label">
            @Html.LabelFor(model => model.PageTitle)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PageTitle)
           @Html.ValidationMessageFor(model => model.PageTitle)
           </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.PageContent,"Content")
        </div>
        <div class="editor-field">
        @Html.TextAreaFor(model=> model.PageContent)
        </div>

      <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "List")
</div>
